< previous page page_76 next page >

Page 76
You also learned about another data objectthe Database object. You can use the Database object to get a list of tables in the database, a list of indexes associated with the tables, and a list of fields in each of the tables.
Quiz
1. Are Visual Basic Database objects dataset-oriented or record-oriented?
2. What is the most common Visual Basic data object?
3. Do Dynasets use a relatively large amount or small amount of workstation RAM? Why?
4. What are the weaknesses of using a Dynaset object?
5. What are the main advantages of using the Table data object?
6. Do you use the Refresh method with the Table data object?
7. Can you open a Table data object by setting the properties of a data control?
8. What is the difference between a Snapshot and a Dynaset data object?
9. Which data object do you use to extract table and field names from a database definition?
Exercises
1. What type of Recordset data object would you useDynaset, Table, or Snapshotto create an attachment to an ODBC data source that you would like to update periodically? Why?
Write the code to open this type of data object. Assume that the database name is C:\DATA\ACCTPAY.MDB, with your desired table named Vendors.
2. Given the same data source as in Exercise 1, write the code to open a data object to be used in the generation of a report. (Assume the RAM memory is adequate on the machine running the program.)
3. Given the same data source as in Exercise 1, write the code that opens the data object so that you can access the data often in a multiuser environment to search for single records.

 
< previous page page_76 next page >

If you like this book, buy it!